public class Class {
    String className;
    String teacher;
    String date;
    String[]stu=new String[20];
    int count=0;
    public void add(String name){
        for (int i = count; i < stu.length; i++) {
            stu[i] = name;
            count++;
            return;
        }
        System.out.println("班级已满");
    }
    public void peo(){
        System.out.println("班级人数："+count);
    }

}
